package com.originskyseed.platform.count.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.originskyseed.platform.count.model.UserBonus;

/**
 * 用户奖金信息表Mapper类（OSI_USER_BONUS）
 * 
 * @author Tangwanghui
 */
public interface UserBonusMapper {

	/**
	 * 删除记录
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 * 
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(UserBonus record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(UserBonus record) throws Exception;

	/**
	 * 更新记录
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(UserBonus record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(UserBonus record) throws Exception;

	/**
	 * 查询记录
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public UserBonus selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<UserBonus> selectList(UserBonus record) throws Exception;

	/**
	 * 分页查询列表
	 * 
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<UserBonus> selectListByPage(Map<String, Object> params) throws Exception;

	/**
	 * 批量插入
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatch(List<UserBonus> list) throws Exception;

	/**
	 * 统计季度年度奖金
	 * 
	 * @param startTime
	 * @param endTime
	 * @return
	 * @throws Exception
	 */
	public List<UserBonus> selectUserBonusByTime(@Param("startTime") String startTime, @Param("endTime") String endTime) throws Exception;
}